package org.altervista.cp.microkernel.persistence;

import java.util.List;

public interface PersistenceQuery<T> {

	Results<T> getResults(boolean connected);

	T getUniqueResult();

	void setMaxResults(int maxResults);

	void setParameter(int index, Object... param);

	void setParameter(String name, Object... param);

	interface Results<T> extends Iterable<T> {
		boolean isConnected();

		List<T> asList();
	}

}
